/*
 * unknowncommand.cpp
 *
 *  Created on: Jan 20, 2010
 *      Author: Wim
 */

#include "unknowncommand.h"
#include <sstream>
using std::ostringstream;

#include <Poco/StringTokenizer.h>
using Poco::StringTokenizer;

#include <iostream>
using std::cout;
using std::endl;

#include <Poco/DOM/DOMWriter.h>
#include <Poco/DOM/Element.h>
#include <Poco/DOM/Text.h>
using Poco::XML::DOMWriter;
using Poco::XML::Element;
using Poco::XML::Text;

namespace Commands
{
	const string UnknownCommand::NAME = "Unknown";

	UnknownCommand::UnknownCommand(string repr, SocketAddress addr, SocketAddress dest) :
		Command(0, true),
		_repr(repr),
		_addr(addr),
		_dest(dest)
	{
	}

	UnknownCommand::~UnknownCommand()
	{

	}

	void UnknownCommand::execute()
	{
	}

	string UnknownCommand::name()
	{
		return string(UnknownCommand::NAME);
	}

	void UnknownCommand::undo()
	{
		throw NotImplemented();
	}

	string UnknownCommand::originalCommandRepr()
	{
		return string(_repr);
	}

	SocketAddress UnknownCommand::originator()
	{
		return SocketAddress(_addr);
	}

	SocketAddress UnknownCommand::destination()
	{
		return SocketAddress(_dest);
	}

	string UnknownCommand::repr()
	{
		return string(_repr);
	}

	CommandCreator UnknownCommand::creator(){
		return UnknownCommand::makeCommand;
	}

	Command* UnknownCommand::makeCommand(string r, void*)
	{
		return 0;
	}
}
